function res = GetXePhaseNoise(obj, varargin)
    p=inputParser;
    p.addOptional('nCol',       1024, @(x) x>2);
    p.addParameter('fSpan',     30.0, @(x) x>1.0);
    p.addParameter('average',   100, @(x) x>0);
    p.addParameter('isReport', false, @islogical);
    p.addParameter('isPlot', true, @islogical);
    p.addParameter('description', 'normal', @ischar);
    p.parse(varargin{:});
    
    %%
    sg = MeasurementComponent.Signal.SignalGroup('XeDrivingGroup');
    sg.subscribe_signal(obj.Xe129,  ziDemodSpectrum.Theta_fft_abs_avg, [1, 1, 1]);
    sg.subscribe_signal(obj.Xe131,  ziDemodSpectrum.Theta_fft_abs_avg, [1, 1, 1]);
    spectrum = sg.getDemodSpectrum(p.Results.nCol, 'average', p.Results.average, 'fSpan', p.Results.fSpan);
    fitting = obj.FitXePhaseNoise(spectrum, 'upperBoundary', obj.Xe131.getSetting('bandwidth'), 'lowerBoundary', 0.5);

    res.timestamp = datetime('now');
    res.signal = spectrum;
    res.fitting = fitting;
    res.phaseNoise129 = fitting.noisebackground129;
    res.phaseNoise131 = fitting.noisebackground131;
    res.paramter.order129 = obj.Xe129.getSetting('order');
    res.paramter.order131 = obj.Xe131.getSetting('order');
    res.paramter.bandwidth129 = obj.Xe129.getSetting('bandwidth');
    res.paramter.bandwidth131 = obj.Xe131.getSetting('bandwidth');
    
    obj.SystemInfo.XePhaseNoise = res;
    
    %%
    if p.Results.isPlot
        fig = obj.PlotXePhaseNoise();
    end
    %%
    if p.Results.isReport
        getReporter;
        rpt.NewRecord(['XePhaseNoise_' p.Results.description]);
        if p.Results.isPlot
            rpt.AppendFigure(fig, sprintf('XePhaseNoise %s', p.Results.description));
        end
    end
    
    getSession;
    sess.addData('XePhaseNoise', res, p.Results.description);
    
end

